from langchain_core.runnables import RunnableParallel

runnable1 = lambda x: {"result1": x["input"].upper()}
runnable2 = lambda x: {"result2": len(x["input"])}

parallel_chain = RunnableParallel(task_1=runnable1, task_2=runnable2)

result = parallel_chain.invoke({"input": "hello world"})

print(type(result), result)
